<?php
	
namespace Admin/Model;
use Think/Model;

class AreaModel extends Model {
	
	/**
	 * 返回所有区域
	 */
	public function getAllArea(){
		$Area = M('area');
		return $Area -> select();	
	} 
	
	/**
	 * 更新区域
	 */
	public function updateArea($id, $data){
		$Area = M('area');
		return $Area -> where('id='.$id) -> save($data);		
	}
	
	/**
	 * 删除区域
	 */
	public function deleteArea($ids) {
		$Area = M('area');
		return $Area -> where($ids) -> delete();
	}
}
